#include    <netinet/in.h>  
#include 	<arpa/inet.h>


using namespace std;

class Client
{
public:
	Client(char* ip, char* port);
	~Client();

   sockaddr_in* getAddress();
	int getSockfd();
	string getIp();
	string getPort();

private:
	sockaddr_in servaddr;
	int sockfd;
	string itsIp;
	string itsPort;
};


Client::Client(char* ip, char* port)
{
	//Needs Exception Checking Here
	itsIp = ip;
	itsPort = port;
	
	bzero(&servaddr, sizeof(servaddr));
	servaddr.sin_family = AF_INET;
	servaddr.sin_port = htons(atoi(port));
	inet_pton(AF_INET, ip , &servaddr.sin_addr);
	sockfd = socket(AF_INET, SOCK_STREAM, 0);

}

Client::~Client()
{
}


string Client::getIp()
{
	return itsIp;
}

string Client::getPort()
{
	return itsPort;
}

sockaddr_in* Client::getAddress()
{
	return &servaddr;
}
int Client::getSockfd()
{
	return sockfd;
}
